<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');
    $router->resource('hospital-appoint','HospitalAppointController');
    $router->resource('hospital-appoint-vaccine','HospitalAppointVaccineController');
    $router->resource('hospital-appoint-month','HospitalAppointMonthController');
    $router->resource('street','StreetController');
    $router->resource('hospital-appoint-street','HospitalAppointStreetController');
    $router->resource('appoint','AppointController');
    //$router->resource('hospital','HospitalController');
    $router->resource('hospital-view','HospitalController');
    $router->resource('hospital-users', 'HospitalUserController');

    $router->resource('family','HospitalUserFamilyController');
    $router->resource('sign-break','HospitalUserBreakController');
    $router->resource('sign-history','HospitalUserFamilyController');
    $router->resource('teams','HospitalTeamController');
    $router->resource('article', 'ArticleController');
    $router->resource('family-edu', 'FamilyEduController');
    $router->resource('notice', 'NoticeController');
    $router->resource('health-person', 'HealthPersonController');
    $router->resource('appoint-num', 'AppointNumController');
    $router->resource('interview', 'InterviewController');
    $router->resource('interview-remind', 'InterviewRemindController');
    $router->get('data-upload', 'DataUploadController@index');
    $router->post('data-upload-callback', 'DataUploadController@callback');

    $router->get('api/appoint_time', 'ApiController@appoint_time');
    $router->get('api/project', 'ApiController@project');
    $router->get('api/city', 'ApiController@city');
    $router->get('api/familys', 'ApiController@familys');
    $router->get('data-index', ['uses' => 'DataController@index']);
    $router->get('data-download', ['uses' => 'DataController@download']);

});
Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware2'),
], function (Router $router) {
    $router->get('push-code', ['uses' => 'AuthController@pushCode']);
});

